package cn.yuanqiao.archive.archiveBorrow.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.lang.reflect.Field;
import java.util.*;

/**
 * archiveBorrow对象 YQDABORROW
 *
 * @author yuanqiao
 * @date 2023-07-14
 */
public class YqDaBorrow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 借阅单ID */
    private Long borrowId;

    /** 流水号 */
    @Excel(name = "流水号")
    private Long borrowNo;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 借阅人 */
    @Excel(name = "借阅人")
    private Long borrowUser;

    /** 借阅单位 */
    @Excel(name = "借阅单位")
    private Long borrowDept;

    /** 借阅天数 */
    @Excel(name = "借阅天数")
    private Integer borrowDays;

    /** 利用目的 */
    @Excel(name = "利用目的")
    private String yongtu;

    /** 备注 */
    @Excel(name = "备注")
    private String beizhu;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long creater;

    /** 创建单位 */
    @Excel(name = "创建单位")
    private Long createDept;

    /** 经办人 */
    @Excel(name = "经办人")
    private Long jingBanRen;

    /** 利用方式 */
    @Excel(name = "利用方式")
    private String liyongfangshi;

    /** 登记人 */
    @Excel(name = "登记人")
    private Long dengJiRen;

    /** 登记人 */
    @Excel(name = "登记人")
    private String phoneNum;

    /** 登记单位 */
    @Excel(name = "登记单位")
    private Long dengJiDept;

    /** 登记时间 */
    @Excel(name = "登记时间")
    private Date dengJiTime;

    /** 开始时间 */
    @Excel(name = "开始时间")
    private Date startTime;

    /** 结束时间 */
    @Excel(name = "结束时间")
    private Date endTime;

    /** 分支代码 */
    @Excel(name = "分支代码")
    private String branchCode;

    /** entryId */
    @Excel(name = "entryId")
    private String entryId;

    /** 档案类型 */
    @Excel(name = "档案类型")
    private String daType;

    /** 流程id */
    @Excel(name = "流程id")
    private String processId;

    private String allowDownload;

    private Integer downloadNum;

    private String[] carIds;

    private String tenantCode;

    private String beginCreateTime;

    private String endCreateTime;

    private String allowPrint;

    private String printNum;

    private String csat;

    private String csatOpinion;

    private String csatState;

    /** 是否领取 isReceive */
    @Excel(name = "是否领取")
    private Integer isReceive;

    /** 是否领取 receiveTime */
    @Excel(name = "领取时间")
    private String receiveTime;


    private Long feedbackId;
    public String getAllowDownload() {
        return allowDownload;
    }

    public void setAllowDownload(String allowDownload) {
        this.allowDownload = allowDownload;
    }

    public Integer getDownloadNum() {
        return downloadNum;
    }

    public void setDownloadNum(Integer downloadNum) {
        this.downloadNum = downloadNum;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getBeginCreateTime() {
        return beginCreateTime;
    }

    public void setBeginCreateTime(String beginCreateTime) {
        this.beginCreateTime = beginCreateTime;
    }

    public String getEndCreateTime() {
        return endCreateTime;
    }

    public void setEndCreateTime(String endCreateTime) {
        this.endCreateTime = endCreateTime;
    }

    public String getTenantCode() {
        return tenantCode;
    }

    public void setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
    }

    public String[] getCarIds() {
        return carIds;
    }

    public void setCarIds(String[] carIds) {
        this.carIds = carIds;
    }

    /** archiveBorrowItem信息 */
    private List<YqdaborrowItem> yqdaborrowItemList;

    public void setBorrowId(Long borrowId)
    {
        this.borrowId = borrowId;
    }

    public Long getBorrowId()
    {
        return borrowId;
    }
    public void setBorrowNo(Long borrowNo)
    {
        this.borrowNo = borrowNo;
    }

    public Long getBorrowNo()
    {
        return borrowNo;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setBorrowUser(Long borrowUser)
    {
        this.borrowUser = borrowUser;
    }

    public Long getBorrowUser()
    {
        return borrowUser;
    }
    public void setBorrowDept(Long borrowDept)
    {
        this.borrowDept = borrowDept;
    }

    public Long getBorrowDept()
    {
        return borrowDept;
    }
    public void setBorrowDays(Integer borrowDays)
    {
        this.borrowDays = borrowDays;
    }

    public Integer getBorrowDays()
    {
        return borrowDays;
    }
    public void setYongtu(String yongtu)
    {
        this.yongtu = yongtu;
    }

    public String getYongtu()
    {
        return yongtu;
    }
    public void setBeizhu(String beizhu)
    {
        this.beizhu = beizhu;
    }

    public String getBeizhu()
    {
        return beizhu;
    }
    public void setCreater(Long creater)
    {
        this.creater = creater;
    }

    public Long getCreater()
    {
        return creater;
    }
    public void setCreateDept(Long createDept)
    {
        this.createDept = createDept;
    }

    public Long getCreateDept()
    {
        return createDept;
    }
    public void setJingBanRen(Long jingBanRen)
    {
        this.jingBanRen = jingBanRen;
    }

    public Long getJingBanRen()
    {
        return jingBanRen;
    }
    public void setLiyongfangshi(String liyongfangshi)
    {
        this.liyongfangshi = liyongfangshi;
    }

    public String getLiyongfangshi()
    {
        return liyongfangshi;
    }
    public void setDengJiRen(Long dengJiRen)
    {
        this.dengJiRen = dengJiRen;
    }

    public Long getDengJiRen()
    {
        return dengJiRen;
    }
    public void setDengJiDept(Long dengJiDept)
    {
        this.dengJiDept = dengJiDept;
    }

    public Long getDengJiDept()
    {
        return dengJiDept;
    }
    public void setDengJiTime(Date dengJiTime)
    {
        this.dengJiTime = dengJiTime;
    }

    public Date getDengJiTime()
    {
        return dengJiTime;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setBranchCode(String branchCode)
    {
        this.branchCode = branchCode;
    }

    public String getBranchCode()
    {
        return branchCode;
    }
    public void setEntryId(String entryId)
    {
        this.entryId = entryId;
    }

    public String getEntryId()
    {
        return entryId;
    }
    public void setDaType(String daType)
    {
        this.daType = daType;
    }

    public String getDaType()
    {
        return daType;
    }

    public List<YqdaborrowItem> getYqdaborrowItemList()
    {
        return yqdaborrowItemList;
    }

    public void setYqdaborrowItemList(List<YqdaborrowItem> yqdaborrowItemList)
    {
        this.yqdaborrowItemList = yqdaborrowItemList;
    }

    public String getProcessId() {
        return processId;
    }

    public void setProcessId(String processId) {
        this.processId = processId;
    }

    public String getAllowPrint() {
        return allowPrint;
    }

    public void setAllowPrint(String allowPrint) {
        this.allowPrint = allowPrint;
    }

    public String getPrintNum() {
        return printNum;
    }

    public void setPrintNum(String printNum) {
        this.printNum = printNum;
    }

    public String getCsat() {
        return csat;
    }

    public void setCsat(String csat) {
        this.csat = csat;
    }

    public String getCsatOpinion() {
        return csatOpinion;
    }

    public void setCsatOpinion(String csatOpinion) {
        this.csatOpinion = csatOpinion;
    }

    public String getCsatState() {
        return csatState;
    }

    public void setCsatState(String csatState) {
        this.csatState = csatState;
    }

    public Long getFeedbackId() {
        return feedbackId;
    }

    public void setFeedbackId(Long feedbackId) {
        this.feedbackId = feedbackId;
    }

    public Integer getIsReceive() {
        return isReceive;
    }

    public void setIsReceive(Integer isReceive) {
        this.isReceive = isReceive;
    }

    public String getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(String receiveTime) {
        this.receiveTime = receiveTime;
    }

    @Override
    public String toString() {
        return "YqDaBorrow{" +
                "borrowId=" + borrowId +
                ", borrowNo=" + borrowNo +
                ", status=" + status +
                ", borrowUser=" + borrowUser +
                ", borrowDept=" + borrowDept +
                ", borrowDays=" + borrowDays +
                ", yongtu='" + yongtu + '\'' +
                ", beizhu='" + beizhu + '\'' +
                ", creater=" + creater +
                ", createDept=" + createDept +
                ", jingBanRen=" + jingBanRen +
                ", liyongfangshi='" + liyongfangshi + '\'' +
                ", dengJiRen=" + dengJiRen +
                ", phoneNum='" + phoneNum + '\'' +
                ", dengJiDept=" + dengJiDept +
                ", dengJiTime=" + dengJiTime +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", branchCode='" + branchCode + '\'' +
                ", entryId='" + entryId + '\'' +
                ", daType='" + daType + '\'' +
                ", processId='" + processId + '\'' +
                ", allowDownload='" + allowDownload + '\'' +
                ", downloadNum=" + downloadNum +
                ", carIds=" + Arrays.toString(carIds) +
                ", tenantCode='" + tenantCode + '\'' +
                ", beginCreateTime='" + beginCreateTime + '\'' +
                ", endCreateTime='" + endCreateTime + '\'' +
                ", allowPrint='" + allowPrint + '\'' +
                ", printNum='" + printNum + '\'' +
                ", csat='" + csat + '\'' +
                ", csatOpinion='" + csatOpinion + '\'' +
                ", csatState='" + csatState + '\'' +
                ", feedbackId=" + feedbackId +
                ", yqdaborrowItemList=" + yqdaborrowItemList +
                ", isReceive=" + isReceive +
                ", receiveTime=" + receiveTime +
                '}';
    }

    public Map<String, Object> toMap() {
        Map<String, Object> map = new HashMap<>();

        // 使用反射获取实体类的字段信息
        Class<?> clazz = this.getClass();
        Field[] fields = clazz.getDeclaredFields();

        try {
            // 遍历所有字段，获取字段名和字段值，并存储到 Map 中
            for (Field field : fields) {
                field.setAccessible(true); // 设置字段可访问，即使是私有字段也可以获取值
                String fieldName = field.getName();
                Object fieldValue = field.get(this); // 获取字段的值
                map.put(fieldName, fieldValue);
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        return map;
    }

    public Map<String, Object> toProcessMap() {
        Map<String, Object> map = new HashMap<>();

        // 使用反射获取实体类的字段信息
        Class<?> clazz = this.getClass();
        Field[] fields = clazz.getDeclaredFields();

        try {
            // 遍历所有字段，获取字段名和字段值，并存储到 Map 中
            for (Field field : fields) {
                field.setAccessible(true); // 设置字段可访问，即使是私有字段也可以获取值
                String fieldName = field.getName();
                Object fieldValue = field.get(this); // 获取字段的值
                map.put(fieldName, fieldValue);
            }
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        return map;
    }
}
